package com.zhiyou100.service;

import com.zhiyou100.entity.Exam;
import com.zhiyou100.mapper.ExamMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author yang
 * @className StudentImpl
 * @packageName com.zhiyou100.service
 * @Description TODO ExamImpl 实现类
 * @date 2020-08-26 10:28
 */
@Repository
public class ExamImpl implements ExamService {
    private ExamMapper mapper;

    @Autowired
    public void setMapper(ExamMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public int addOne(Exam exam) {
        return mapper.addOne(exam);
    }

    @Override
    public List<Exam> listExams() {
        return mapper.listExams();
    }

    @Override
    public Exam getOneByEid(Integer eid) {
        return mapper.getOneByEid(eid);
    }

    @Override
    public int insertOneScore(int sid, int eid, float score) {
        return mapper.insertOneScore(sid, eid, score);
    }
}
